package com.dhcc.core.modules.msgcenter.warpper;

import java.util.Map;

import com.dhcc.core.framework.base.warpper.BaseControllerWarpper;
import com.dhcc.core.framework.util.CommonUtil;
import com.dhcc.core.modules.msgcenter.cache.MsgCache;

/**
 * 消息记录列表的包装
 * 
 * @ClassName: MsgModuleWarpper
 * @Description: TODO
 * @author: cyf
 * @date: 2018年1月2日 上午10:43:13
 */
public class MsgPushLogWarpper extends BaseControllerWarpper {

    public MsgPushLogWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {

        String pushType = (String) map.get("pushType");
        if (CommonUtil.isEmpty(pushType)) {
            map.put("pushTypeName", "");
        } else {
            Map<String, String> pushTypes = MsgCache.me().getPushTypes();
            map.put("pushTypeName", pushTypes.get(pushType));
        }
    }

}
